import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/class',
    name: 'Class',
    component: () => import(/* webpackChunkName: "about" */ '../views/Class.vue'),
    children:[
    {
      path: 'all',
      name: 'All',
      component: () => import(/* webpackChunkName: "about" */ '../views/Classfy/All.vue'),
    },
    {
      path: 'affection',
      name: 'Affection',
      component: () => import(/* webpackChunkName: "about" */ '../views/Classfy/Affection.vue'),
    },
    {
      path: 'campus',
      name: 'Campus',
      component: () => import(/* webpackChunkName: "about" */ '../views/Classfy/Campus.vue'),
    },
    {
      path: 'urban',
      name: 'Urban',
      component: () => import(/* webpackChunkName: "about" */ '../views/Classfy/Urban.vue'),
    },
    {
      path: 'fantasy',
      name: 'Fantasy',
      component: () => import(/* webpackChunkName: "about" */ '../views/Classfy/Fantasy.vue'),
    }
  ]
  },
  {
    path: '/rank',
    name: 'Rank',
    component: () => import(/* webpackChunkName: "about" */ '../views/Rank.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
